package com.mindao.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringCodegen", date = "2016-09-25T10:54:25.761Z")

@Configuration
@EnableSwagger2
public class SwaggerConfig {
	 @Bean
	    public Docket createRestApi() {
	        return new Docket(DocumentationType.SWAGGER_2)
	                .pathMapping("/")
	                .select()
	                .apis(RequestHandlerSelectors.basePackage("com.mindao"))
	                .paths(PathSelectors.any())
	                .build().apiInfo(new ApiInfoBuilder()
	                        .title("开放API")
	                        .description("Devops工具开放API")
	                        .version("1.0")
	                        .contact(new Contact("凌黎","blog.csdn.net","3436070@qq.com"))
	                        .license("The Apache License")
	                        .licenseUrl("http://www.baidu.com")
	                    	.build());
	    }
	 
	 /*
	ApiInfo apiInfo() {
		return new ApiInfoBuilder().title("互联网微服务架构 API管理平台").description("构建互联网架构").license("").licenseUrl("")
				.termsOfServiceUrl("").version("1.0.0").contact(new Contact("", "", "")).build();
	}
*/

	

}
